#!/bin/sh
# At this time I have this as is, but I plain to have that done with
# some form of makefile and maybe even the config.m4 expected by phpize

set -e
echo "Compiling..."
gcc -I ../../BUILD/libtld/include `php-config --includes` -fpic -c  php_libtld.c
echo "Linking..."
gcc -shared php_libtld.o -o php_libtld.so -L ../../BUILD/libtld/src -ltld_static -lstdc++
echo "Installing..."
sudo cp php_libtld.so `php-config --extension-dir`
